package com.cf.faq.controller;

import com.cf.faq.model.Faq;
import com.cf.faq.model.FaqService;
import com.cf.vo.ResponseVo;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * boot-message-FaqController
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/7/12 下午 03:45
 */
@RequestMapping("/faq")
public class FaqFrontController {

    @Autowired
    private FaqService faqService;

    @RequestMapping("/public")
    public ResponseVo<List<Faq>> faqs() {
        PageHelper.orderBy("od asc");
        return ResponseVo.success(faqService.selectAll(), "获取faq成功！");
    }

}
